package com.icas.enums;


/**
 * @author tocchen
 * @Date 2022/4/18 19:41
 * @Description
 */

public enum MsgResultEnum {

    /** 请求成功 */
    RESULT_SUCCESS(0, "succeeded"),

    /** 帐号或密码错误 */
    Account_ERROR(1,"Incorrect account or password"),

    /** 用户已存在 */
    USER_EXISTS_ERROR(5,"User already exists"),

    /** 添加用户失败 */
    ADDUSER_ERROR(6,"Add user failed"),

    /** 更新密码失败 */
    UPPASSWORD_ERROR(7,"Up password failed"),

    /** 打开openid失败 */
    UPOPENID_ERROR(8,"Up openid failed"),

    /** 删除失败 */
    DELCASE_ERROR(11, "Deletion failed"),

    /** 失败 */
    CREATE_ERROR(12,"Failed to create account"),

    /* 账号信息不存在 */
    ACCOUNT_NOT_FOUND(14,"User information does not exist"),

    /** 查询失败 */
    QUERY_FAILED(15,"Query failed"),

    /** 失败 */
    ERROR(16,"Error"),

    /** 数据格式错误 */
    DATA_FORMAT_ERROR(17, "Data format error"),

    /** 更新失败 */
    UPDATE_ERROR(18,"UpDate failed");

    private String msg;
    private Integer code;

    MsgResultEnum(int code, String msg) {
        this.msg = msg;
        this.code = code;
    }

    public Integer getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
